home *** CD-ROM | disk | FTP | other *** search
/ 3D Game Programming All in One / 3D Game Programming All in One Disc.iso / 3D2E / RESOURCES / KOOB / creator / editor / objectBuilderGui.gui < prev    next >
Text File  |  2005-11-23  |  20KB  |  681 lines

  1. //--- OBJECT WRITE BEGIN ---
  2. new GuiControl(ObjectBuilderGui) {
  3.     profile = "GuiDefaultProfile";
  4.     horizSizing = "right";
  5.     vertSizing = "bottom";
  6.     position = "0 0";
  7.     extent = "640 480";
  8.     minExtent = "8 8";
  9.     visible = "1";
  10.     setFirstResponder = "0";
  11.     modal = "1";
  12.     helpTag = "0";
  13.  
  14.     new GuiWindowCtrl(OBTargetWindow) {
  15.         profile = "GuiWindowProfile";
  16.         horizSizing = "right";
  17.         vertSizing = "bottom";
  18.         position = "217 74";
  19.         extent = "256 282";
  20.         minExtent = "8 8";
  21.         visible = "1";
  22.         setFirstResponder = "0";
  23.         modal = "1";
  24.         helpTag = "0";
  25.         resizeWidth = "1";
  26.         resizeHeight = "1";
  27.         canMove = "1";
  28.         canClose = "0";
  29.         canMinimize = "0";
  30.         canMaximize = "0";
  31.         minSize = "50 50";
  32.  
  33.         new GuiTextCtrl() {
  34.             profile = "GuiCenterTextProfile";
  35.             horizSizing = "right";
  36.             vertSizing = "bottom";
  37.             position = "13 31";
  38.             extent = "84 25";
  39.             minExtent = "8 8";
  40.             visible = "1";
  41.             setFirstResponder = "0";
  42.             modal = "1";
  43.             helpTag = "0";
  44.             text = "Object Name:";
  45.         };
  46.         new GuiTextEditCtrl(OBObjectName) {
  47.             profile = "GuiTextEditProfile";
  48.             horizSizing = "right";
  49.             vertSizing = "bottom";
  50.             position = "105 31";
  51.             extent = "143 18";
  52.             minExtent = "8 8";
  53.             visible = "1";
  54.             setFirstResponder = "0";
  55.             modal = "1";
  56.             helpTag = "0";
  57.             historySize = "0";
  58.         };
  59.         new GuiControl(OBContentWindow) {
  60.             profile = "GuiButtonProfile";
  61.             horizSizing = "right";
  62.             vertSizing = "bottom";
  63.             position = "8 56";
  64.             extent = "240 193";
  65.             minExtent = "0 0";
  66.             visible = "1";
  67.             setFirstResponder = "0";
  68.             modal = "1";
  69.             helpTag = "0";
  70.         };
  71.         new GuiButtonCtrl(OBOKButton) {
  72.             profile = "GuiButtonProfile";
  73.             horizSizing = "right";
  74.             vertSizing = "bottom";
  75.             position = "70 254";
  76.             extent = "80 20";
  77.             minExtent = "8 8";
  78.             visible = "1";
  79.             setFirstResponder = "0";
  80.             modal = "1";
  81.             command = "ObjectBuilderGui.onOK();";
  82.             helpTag = "0";
  83.             text = "OK";
  84.         };
  85.         new GuiButtonCtrl(OBCancelButton) {
  86.             profile = "GuiButtonProfile";
  87.             horizSizing = "right";
  88.             vertSizing = "bottom";
  89.             position = "156 254";
  90.             extent = "80 20";
  91.             minExtent = "8 8";
  92.             visible = "1";
  93.             setFirstResponder = "0";
  94.             modal = "1";
  95.             command = "ObjectBuilderGui.onCancel();";
  96.             helpTag = "0";
  97.             text = "Cancel";
  98.         };
  99.     };
  100. };
  101. //--- OBJECT WRITE END ---
  102.  
  103. function ObjectBuilderGui::init(%this)
  104. {
  105.    %this.baseOffsetX       = 9;
  106.    %this.baseOffsetY       = 10;
  107.    %this.scriptFile        = "editor/newObject.cs";
  108.    %this.defaultObjectName = "";
  109.    %this.defaultFieldStep  = 26;
  110.    %this.columnOffset      = 95;
  111.  
  112.    %this.fieldNameExtent   = "132 18";
  113.    %this.textEditExtent    = "127 18";
  114.    %this.checkBoxExtent    = "18 18";
  115.    %this.popupMenuExtent   = "127 18";
  116.    %this.fileButtonExtent  = "127 18";
  117.  
  118.    //
  119.    %this.numControls       = 0;
  120.  
  121.    %this.reset();
  122. }
  123.  
  124. function ObjectBuilderGui::reset(%this)
  125. {
  126.    %this.curXPos           = %this.baseOffsetX;
  127.    %this.curYPos           = %this.baseOffsetY;
  128.    %this.createCallback    = "";
  129.    %this.currentControl    = 0;
  130.  
  131.    //
  132.    OBObjectName.setValue(%this.defaultObjectName);
  133.  
  134.    //
  135.    %this.newObject         = 0;
  136.    %this.className         = "";
  137.    %this.numFields         = 0;
  138.  
  139.    //
  140.    for(%i = 0; %i < %this.numControls; %i++)
  141.    {
  142.       %this.textControls[%i].delete();
  143.       %this.controls[%i].delete();
  144.    }
  145.    %this.numControls = 0;
  146. }
  147.  
  148. //------------------------------------------------------------------------------
  149.  
  150. function ObjectBuilderGui::createFileType(%this, %index)
  151. {
  152.    if(%index >= %this.numFields || %this.field[%index, name] $= "")
  153.    {
  154.       error("ObjectBuilderGui::createFileType: invalid field");
  155.       return;
  156.    }
  157.  
  158.    //
  159.    if(%this.field[%index, text] $= "")
  160.       %name = %this.field[%index, name];
  161.    else
  162.       %name = %this.field[%index, text];
  163.  
  164.    // 
  165.    %this.textControls[%this.numControls] = new GuiTextCtrl() {
  166.       profile = "GuiTextProfile";
  167.       text = %name;
  168.       extent = %this.fieldNameExtent;
  169.       position = %this.curXPos @ " " @ %this.curYPos;
  170.       modal = "1";
  171.    };
  172.  
  173.    // 
  174.    %this.controls[%this.numControls] = new GuiButtonCtrl() {
  175.       profile = "GuiButtonProfile";
  176.       extent = %this.fileButtonExtent;
  177.       position = %this.curXPos + %this.columnOffset @ " " @ %this.curYPos;
  178.       modal = "1";
  179.       command = %this @ ".getFileName(" @ %index @ ");";
  180.    };
  181.  
  182.    %val = %this.field[%index, value];
  183.    %this.controls[%this.numControls].setValue(fileBase(%val) @ fileExt(%val));
  184.  
  185.    %this.numControls++;
  186.    %this.curYPos += %this.defaultFieldStep;
  187. }
  188.  
  189. function ObjectBuilderGui::getFileName(%this, %index)
  190. {
  191.    if(%index >= %this.numFields || %this.field[%index, name] $= "")
  192.    {
  193.       error("ObjectBuilderGui::getFileName: invalid field");
  194.       return;
  195.    }
  196.    
  197.    %val = %this.field[%index, value];
  198.  
  199.    %path = filePath(%val);
  200.    %ext = fileExt(%val);
  201.  
  202.    %this.currentControl = %index;
  203.    getLoadFilename(%path @ "*" @ %ext, %this @ ".gotFileName");
  204. }
  205.  
  206. function ObjectBuilderGui::gotFileName(%this, %name)
  207. {
  208.    %this.controls[%this.currentControl].setValue(%name);
  209. }
  210.  
  211. //------------------------------------------------------------------------------
  212.  
  213. function ObjectBuilderGui::createDataBlockType(%this, %index)
  214. {
  215.    if(%index >= %this.numFields || %this.field[%index, name] $= "")
  216.    {
  217.       error("ObjectBuilderGui::createDataBlockType: invalid field");
  218.       return;
  219.    }
  220.  
  221.    //
  222.    if(%this.field[%index, text] $= "")
  223.       %name = %this.field[%index, name];
  224.    else
  225.       %name = %this.field[%index, text];
  226.  
  227.    // 
  228.    %this.textControls[%this.numControls] = new GuiTextCtrl() {
  229.       profile = "GuiTextProfile";
  230.       text = %name;
  231.       extent = %this.fieldNameExtent;
  232.       position = %this.curXPos @ " " @ %this.curYPos;
  233.       modal = "1";
  234.    };
  235.  
  236.    // 
  237.    %this.controls[%this.numControls] = new GuiPopupMenuCtrl() {
  238.       profile = "GuiPopUpMenuProfile";
  239.       extent = %this.popupMenuExtent;
  240.       position = %this.curXPos + %this.columnOffset @ " " @ %this.curYPos;
  241.       modal = "1";
  242.       maxPopupHeight = "200";
  243.    };
  244.  
  245.    %classname = getWord(%this.field[%index, value], 0);
  246.  
  247.    %this.controls[%this.numControls].add("", -1);
  248.  
  249.    // add the datablocks
  250.    for(%i = 0; %i < DataBlockGroup.getCount(); %i++)
  251.    {
  252.       %obj = DataBlockGroup.getObject(%i);
  253.       if(%obj.getClassName() $= %classname)
  254.          %this.controls[%this.numControls].add(%obj.getName(), %i);
  255.    }
  256.    
  257.    %this.controls[%this.numControls].setValue(getWord(%this.field[%index, value], 1));
  258.  
  259.    %this.numControls++;
  260.    %this.curYPos += %this.defaultFieldStep;
  261. }
  262.  
  263. function ObjectBuilderGui::createBoolType(%this, %index)
  264. {
  265.    if(%index >= %this.numFields || %this.field[%index, name] $= "")
  266.    {
  267.       error("ObjectBuilderGui::createBoolType: invalid field");
  268.       return;
  269.    }
  270.    
  271.    //
  272.    if(%this.field[%index, value] $= "")
  273.       %value = 0;
  274.    else
  275.       %value = %this.field[%index, value];
  276.  
  277.    //
  278.    if(%this.field[%index, text] $= "")
  279.       %name = %this.field[%index, name];
  280.    else
  281.       %name = %this.field[%index, text];
  282.  
  283.    // 
  284.    %this.textControls[%this.numControls] = new GuiTextCtrl() {
  285.       profile = "GuiTextProfile";
  286.       text = %name;
  287.       extent = %this.fieldNameExtent;
  288.       position = %this.curXPos @ " " @ %this.curYPos;
  289.       modal = "1";
  290.    };
  291.  
  292.    // 
  293.    %this.controls[%this.numControls] = new GuiCheckBoxCtrl() {
  294.       profile = "GuiCheckBoxProfile";
  295.       extent = %this.checkBoxExtent;
  296.       position = %this.curXPos + %this.columnOffset @ " " @ %this.curYPos;
  297.       modal = "1";
  298.    };
  299.  
  300.    %this.controls[%this.numControls].setValue(%value);
  301.    
  302.    %this.numControls++;
  303.    %this.curYPos += %this.defaultFieldStep;
  304. }
  305.  
  306. function ObjectBuilderGui::createStringType(%this, %index)
  307. {
  308.    if(%index >= %this.numFields || %this.field[%index, name] $= "")
  309.    {
  310.       error("ObjectBuilderGui::createStringType: invalid field");
  311.       return;
  312.    }
  313.    
  314.    //
  315.    if(%this.field[%index, text] $= "")
  316.       %name = %this.field[%index, name];
  317.    else
  318.       %name = %this.field[%index, text];
  319.  
  320.    // 
  321.    %this.textControls[%this.numControls] = new GuiTextCtrl() {
  322.       profile = "GuiTextProfile";
  323.       text = %name;
  324.       extent = %this.fieldNameExtent;
  325.       position = %this.curXPos @ " " @ %this.curYPos;
  326.       modal = "1";
  327.    };
  328.  
  329.    // 
  330.    %this.controls[%this.numControls] = new GuiTextEditCtrl() {
  331.       profile = "GuiTextEditProfile";
  332.       extent = %this.textEditExtent;
  333.       text = %this.field[%index, value];
  334.       position = %this.curXPos + %this.columnOffset @ " " @ %this.curYPos;
  335.       modal = "1";
  336.    };
  337.    
  338.    %this.numControls++;
  339.    %this.curYPos += %this.defaultFieldStep;
  340. }
  341.  
  342. //------------------------------------------------------------------------------
  343.  
  344. function ObjectBuilderGui::adjustSizes(%this)
  345. {
  346.    if(%this.numControls == 0)
  347.       %this.curYPos = 0;
  348.  
  349.    OBTargetWindow.extent = "256 " @ %this.curYPos + 88;
  350.    OBContentWindow.extent = "240 " @ %this.curYPos;
  351.    OBOKButton.position = "70 " @ %this.curYPos + 62;
  352.    OBCancelButton.position = "156 " @ %this.curYPos + 62;
  353. }
  354.  
  355. function ObjectBuilderGui::process(%this)
  356. {
  357.    if(%this.className $= "")
  358.    {
  359.       error("ObjectBuilderGui::process: classname is not specified");
  360.       return;
  361.    }
  362.  
  363.    OBTargetWindow.setValue("Building Object: " @ %this.className);
  364.  
  365.    //
  366.    for(%i = 0; %i < %this.numFields; %i++)
  367.    {
  368.       switch$(%this.field[%i, type])
  369.       {
  370.          case "TypeBool":
  371.             %this.createBoolType(%i);
  372.  
  373.          case "TypeDataBlock":
  374.             %this.createDataBlockType(%i);
  375.  
  376.          case "TypeFile":
  377.             %this.createFileType(%i);
  378.  
  379.          default:
  380.             %this.createStringType(%i);
  381.       }
  382.    }
  383.    
  384.    // add the controls   
  385.    for(%i = 0; %i < %this.numControls; %i++)
  386.    {
  387.       OBContentWindow.add(%this.textControls[%i]);
  388.       OBContentWindow.add(%this.controls[%i]);
  389.    }
  390.  
  391.    //
  392.    %this.adjustSizes();
  393.  
  394.    //
  395.    Canvas.pushDialog(%this);
  396. }
  397.  
  398. function ObjectBuilderGui::processNewObject(%this, %obj)
  399. {
  400.    if(%this.createCallback !$= "")
  401.       eval(%this.createCallback);
  402.  
  403.    if(!isObject(EWorldEditor))
  404.       return;
  405.  
  406.    $InstantGroup.add(%obj);
  407.    EWorldEditor.clearSelection();
  408.    EWorldEditor.selectObject(%obj);
  409.    EWorldEditor.dropSelection();
  410. }
  411.  
  412. function ObjectBuilderGui::onOK(%this)
  413. {
  414.    // get current values
  415.    for(%i = 0; %i < %this.numControls; %i++)
  416.       %this.field[%i, value] = %this.controls[%i].getValue();
  417.  
  418.    // 
  419.    %file = new FileObject();
  420.  
  421.    %file.openForWrite(%this.scriptFile);
  422.  
  423.    %file.writeLine(%this @ ".newObject = new " @ %this.className @ "(" @ OBObjectName.getValue() @ ") {");
  424.    
  425.    for(%i = 0; %i < %this.numFields; %i++)
  426.       %file.writeLine("   " @ %this.field[%i, name] @ " = \"" @ %this.field[%i, value] @ "\";");
  427.  
  428.    %file.writeLine("};");
  429.  
  430.    %file.close();
  431.    %file.delete();
  432.  
  433.    //
  434.    exec(%this.scriptFile);
  435.    if(%this.newObject != 0)
  436.       %this.processNewObject(%this.newObject);
  437.  
  438.    %this.reset();
  439.    Canvas.popDialog(%this);
  440. }
  441.  
  442. function ObjectBuilderGui::onCancel(%this)
  443. {
  444.    %this.reset();
  445.    Canvas.popDialog(%this);
  446. }
  447.  
  448. function ObjectBuilderGui::addField(%this, %name, %type, %text, %value)
  449. {
  450.    %this.field[%this.numFields, name] = %name;
  451.    %this.field[%this.numFields, type] = %type;
  452.    %this.field[%this.numFields, text] = %text;
  453.    %this.field[%this.numFields, value] = %value;
  454.  
  455.    %this.numFields++;
  456. }
  457.  
  458. //------------------------------------------------------------------------------
  459. // Environment
  460. //------------------------------------------------------------------------------
  461.  
  462. function ObjectBuilderGui::buildfxFoliageReplicator(%this)
  463. {
  464.     %this.className = "fxFoliageReplicator";
  465.     %this.process();
  466. }
  467.  
  468. function ObjectBuilderGui::buildfxShapeReplicator(%this)
  469. {
  470.     %this.className = "fxShapeReplicator";
  471.     %this.process();
  472. }
  473.  
  474. function ObjectBuilderGui::buildfxSunLight(%this)
  475. {
  476.     %this.className = "fxSunLight";
  477.     %this.process();
  478. }
  479.  
  480. function ObjectBuilderGui::buildSky(%this)
  481. {
  482.    %this.className = "Sky";
  483.  
  484.    %this.addField("materialList", "TypeFile", "Material list",  "Lush_l4.dml");
  485.    %this.addField("cloudSpeed[0]", "TypePoint2", "Cloud0 Speed", "0.0000003 0.0000003");
  486.    %this.addField("cloudSpeed[1]", "TypePoint2", "Cloud1 Speed", "0.0000006 0.0000006");
  487.    %this.addField("cloudSpeed[2]", "TypePoint2", "Cloud2 Speed", "0.0000009 0.0000009");
  488.    %this.addField("cloudHeightPer[0]", "TypeFloat", "Cloud0 Height", "0.349971");
  489.    %this.addField("cloudHeightPer[1]", "TypeFloat", "Cloud1 Height", "0.25");
  490.    %this.addField("cloudHeightPer[2]", "TypeFloat", "Cloud2 Height", "0.199973");
  491.    %this.addField("visibleDistance", "TypeFloat", "Visible distance", "900");
  492.    %this.addField("fogDistance", "TypeFloat", "Fog distance", "600");
  493.    %this.addField("fogColor", "TypeColor", "Fog color", "0.5 0.5 0.5");
  494.    %this.addField("fogVolume1", "TypePoint3", "Fog volume", "120 0 100");
  495.    %this.addField("fogVolume2", "TypePoint3", "Fog volume", "0 0 0");
  496.    %this.addField("fogVolume3", "TypePoint3", "Fog volume", "0 0 0");
  497.  
  498.    %this.process();
  499. }
  500.  
  501. function ObjectBuilderGui::buildfxLight(%this)
  502. {
  503.    %this.className = "fxLight";
  504.    %this.addField("dataBlock", "TypeDataBlock", "fxLight Data", "fxLightData");
  505.    %this.process();
  506. }
  507.  
  508. function ObjectBuilderGui::buildSun(%this)
  509. {
  510.    %this.className = "Sun";
  511.  
  512.    %this.addField("direction", "TypeVector", "Direction", "1 1 -1");
  513.    %this.addField("color", "TypeColor", "Sun color", "0.8 0.8 0.8");
  514.    %this.addField("ambient", "TypeColor", "Ambient color", "0.2 0.2 0.2");
  515.  
  516.    %this.process();
  517. }
  518.  
  519. function ObjectBuilderGui::buildLightning(%this)
  520. {
  521.    %this.className = "Lightning";
  522.  
  523.    %this.addField("dataBlock", "TypeDataBlock", "Data block", "LightningData DefaultStorm");
  524.  
  525.    %this.process();
  526. }
  527.  
  528. function ObjectBuilderGui::buildWater(%this)
  529. {
  530.    %this.className = "WaterBlock";
  531.  
  532.    // jff: this object needs some work!!
  533.    %this.addField("extent", "TypePoint3", "Extent", "100 100 10");
  534.    %this.addField("textureSize", "TypePoint2", "Texture size", "32 32");
  535.    %this.addField("params[0]", "TypePoint4", "Wave Param0", "0.32 -0.67 0.066 0.5");
  536.    %this.addField("params[1]", "TypePoint4", "Wave Param1", "0.63 -2.41 0.33 0.21");
  537.    %this.addField("params[2]", "TypePoint4", "Wave Param2", "0.39 0.39 0.2 0.133");
  538.    %this.addField("params[3]", "TypePoint4", "Wave Param3", "1.21 -0.61 0.13 -0.33");
  539.    %this.addField("floodFill", "TypeBool", "Flood fill?", "true");
  540.    %this.addField("seedPoints", "TypeString", "Seed points", "0 0 1 0 1 1 0 1");
  541.  
  542.    %this.addField("surfaceTexture", "TypeString", "Surface Texture", 
  543.       "~/data/water/water");
  544.    %this.addField("envMapTexture", "TypeString", "Env Map Texture", 
  545.       "~/data/skies/sunset_0007");
  546.  
  547.    %this.process();
  548. }
  549.  
  550. function ObjectBuilderGui::buildTerrain(%this)
  551. {
  552.    %this.className = "TerrainBlock";
  553.    %this.createCallback = "ETerrainEditor.attachTerrain();";
  554.  
  555.    %this.addField("terrainFile", "TypeFile", "Terrain file", "terrains/terr1.ter");
  556.    %this.addField("squareSize", "TypeInt", "Square size", "8");
  557.  
  558.    %this.process();
  559. }
  560.  
  561. function ObjectBuilderGui::buildAudioEmitter(%this)
  562. {
  563.    %this.className = "AudioEmitter";
  564.    %this.addField("profile", "TypeDataBlock", "Sound Profile", "AudioProfile");
  565.    %this.addField("description", "TypeDataBlock", "Sound Description", "AudioDescription");
  566.    %this.addField("fileName", "TypeFile", "Audio file", "");
  567.    %this.addField("useProfileDescription", "TypeBool", "Use profile's desc?", "false");
  568.    %this.addFIeld("volume", "TypeFloat", "Volume", "1.0");
  569.    %this.addField("isLooping", "TypeBool", "Looping?", "true");
  570.    %this.addField("is3D", "TypeBool", "Is 3D sound?", "true");
  571.    %this.addField("ReferenceDistance", "TypeFloat", "Reference distance", "5.0"); //EFM
  572.    %this.addField("maxDistance", "TypeFloat", "Max distance", "35.0");
  573.    %this.addField("coneInsideAngle", "TypeInt", "Cone inside angle", "90");
  574.    %this.addField("coneOutsideAngle", "TypeInt", "Cone outside angle", "120");
  575.    %this.addField("coneOutsideVolume", "TypeFloat", "Cone outside volume", "0.25");
  576.    %this.addField("loopCount", "TypeInt", "Loop count", "-1");
  577.    %this.addField("minLoopGap", "TypeInt", "Min loop gap (ms)", "0");
  578.    %this.addField("maxLoopGap", "TypeInt", "Max loop gap (ms)", "0");
  579.    %this.addField("type", "TypeInt", "Audio type", $SimAudioType);
  580.    %this.process();
  581. }
  582.  
  583. function ObjectBuilderGui::buildPrecipitation(%this)
  584. {
  585.    %this.className = "Precipitation";
  586.    %this.addField("nameTag", "TypeString", "Name", "");
  587.    %this.addField("dataBlock", "TypeDataBlock", "Precipitation data", "PrecipitationData");
  588.    %this.process();
  589. }
  590.  
  591. function ObjectBuilderGui::buildParticleEmitter(%this)
  592. {
  593.    %this.className = "ParticleEmitterNode";
  594.    %this.addField("dataBlock", "TypeDataBlock", "datablock", "ParticleEmitterNodeData");
  595.    %this.addField("emitter",   "TypeDataBlock", "Particle data", "ParticleEmitterData");
  596.    %this.process();
  597. }
  598.  
  599. //------------------------------------------------------------------------------
  600. // Mission
  601. //------------------------------------------------------------------------------
  602.  
  603. function ObjectBuilderGui::buildMissionArea(%this)
  604. {
  605.    %this.className = "MissionArea";
  606.    %this.addField("area", "TypeRect", "Bounding area", "0 0 1024 1024");
  607.    %this.process();
  608. }
  609.  
  610. function ObjectBuilderGui::buildPath(%this)
  611. {
  612.    %this.className = "Path";
  613.    %this.process();
  614. }
  615.  
  616. function ObjectBuilderGui::buildPathMarker(%this)
  617. {
  618.    %this.className = "Marker";
  619.    %this.process();
  620. }
  621.  
  622. //function ObjectBuilderGui::buildForcefield(%this)
  623. //{
  624. //   %this.className = "ForcefieldBare";
  625. //   %this.addField("dataBlock", "TypeDataBlock", "Data Block", "ForceFieldBareData defaultForceFieldBare");
  626. //   %this.process();
  627. //}
  628.  
  629. function ObjectBuilderGui::buildTrigger(%this)
  630. {
  631.    %this.className = "Trigger";
  632.    %this.addField("dataBlock", "TypeDataBlock", "Data Block", "TriggerData defaultTrigger");
  633.    %this.addField("polyhedron", "TypeTriggerPolyhedron", "Polyhedron", "0 0 0 1 0 0 0 -1 0 0 0 1");
  634.    %this.process();
  635. }
  636.  
  637. function ObjectBuilderGui::buildPhysicalZone(%this)
  638. {
  639.    %this.className = "PhysicalZone";
  640.    %this.addField("polyhedron", "TypeTriggerPolyhedron", "Polyhedron", "0 0 0 1 0 0 0 -1 0 0 0 1");
  641.    %this.process();
  642. }
  643.  
  644. function ObjectBuilderGui::buildCamera(%this)
  645. {
  646.    %this.className = "Camera";
  647.  
  648.    %this.addField("position", "TypePoint3", "Position", "0 0 0");
  649.    %this.addField("rotation", "TypePoint4", "Rotation", "1 0 0 0");
  650.    %this.addField("dataBlock", "TypeDataBlock", "Data block", "CameraData Observer");
  651.    %this.addField("team", "TypeInt", "Team", "0");
  652.  
  653.    %this.process();
  654. }
  655.  
  656. //------------------------------------------------------------------------------
  657. // System
  658. //------------------------------------------------------------------------------
  659.  
  660. function ObjectBuilderGui::buildSimGroup(%this)
  661. {
  662.    %this.className = "SimGroup";
  663.    %this.process();
  664. }
  665.  
  666. //------------------------------------------------------------------------------
  667. // AI
  668. //------------------------------------------------------------------------------
  669.  
  670. //function ObjectBuilderGui::buildObjective(%this)
  671. //{
  672. //   %this.className = "AIObjective";
  673. //   %this.process();
  674. //}
  675.  
  676. //function ObjectBuilderGui::buildNavigationGraph(%this)
  677. //{  
  678. //   %this.className = "NavigationGraph";
  679. //   %this.process();
  680. //}
  681.